package com.anhry.www.safety.manage.zczb.struts.action;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.anhry.www.safety.manage.enterprise.bean.TbCorpInfo;
import com.anhry.www.safety.manage.zczb.bean.TbZczbXwBgd;
import com.anhry.www.safety.manage.zczb.bean.TbZczbXwBzh;
import com.anhry.www.safety.manage.zczb.bean.TbZczbXwHzd;
import com.anhry.www.safety.manage.zczb.bean.TbZczbXwYh;
import com.anhry.www.safety.manage.zczb.struts.base.ZczbBaseAction;
import com.anhry.www.safety.util.Constants;
import com.anhry.www.safety.util.DateUtil;
import com.anhry.www.safety.util.Environment;
import com.anhry.www.safety.util.Loggers;
import com.anhry.www.safety.util.Util;
import com.anhry.www.safety.util.UtilMethod;

/**
 * @date:2012-10-23
 * @remark:小微企业自查自报管理
 * @author:dongbin
 */
@Controller
@Scope("prototype")
@SuppressWarnings("unchecked")
public class XwAction extends ZczbBaseAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private TbZczbXwBgd xwBgd;
	private String[] yhYes;//合格
	private String[] yhNo;//不合格
	private String[] zgYes;//已整改
	private String[] zgNo;//未整改
	private String bgdPersonnel;//自查负责人
	private static Environment env = Environment.getInstance();
	//是否测试环境
	private boolean isTestEnv = "true".equals(env.getProperty("system.environment.test"));
	
	/**
	 * 当前半月报告单列表
	 * @return
	 */
	public String bgdList(){
		try {
			TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
			String year = UtilMethod.getZcYear();
			String month = UtilMethod.getZcMonth();
			if(isHalfMonthReport(corp.getReportType())) {
				int currentHalf = DateUtil.currentReportPeriod();
				this.setObjList((List)this.utilService.getHqlQuery("from TbZczbXwBgd t where 1=1 and t.corpId="+corp.getId()+" and t.bgdYear="+year+" and t.bgdMonth="+month+" and t.bgdHalf="+currentHalf+" order by t.bgdNum"));
			} else {
				this.setObjList((List)this.utilService.getHqlQuery("from TbZczbXwBgd t where 1=1 and t.corpId="+corp.getId()+" and t.bgdYear="+year+" and t.bgdMonth="+month+" order by t.bgdNum"));
			}
			
			this.setResult("xw_bgd_list");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction bgdList() 异常："+e.getMessage());
		}
		return ERROR;
	}
	/**
	 * 是否半月报企业
	 * @param reportType
	 * @return
	 */
	private boolean isHalfMonthReport(String reportType) {
		return (StringUtils.isNotBlank(reportType) && Constants.CORP_REPORT_HALF_MONTH.equals(reportType));
	}
	/**
	 * 新建自查
	 * @return
	 */
	public String toZc(){
		try {
			TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
			if(null==this.hzdId || "".equals(this.hzdId)){
				List list = null;
				if(isHalfMonthReport(corp.getReportType())) {
					list = (List)this.utilService.getHqlQuery("from TbZczbXwHzd t where 1=1 " +
							"and t.hzdYear="+UtilMethod.getZcYear()+" and t.hzdMonth="+UtilMethod.getZcMonth()+" and t.hzdHalf="+ DateUtil.currentReportPeriod()+" and t.corpId="+corp.getId());
				} else {
					list = (List)this.utilService.getHqlQuery("from TbZczbXwHzd t where 1=1 " +
							"and t.hzdYear="+UtilMethod.getZcYear()+" and t.hzdMonth="+UtilMethod.getZcMonth()+" and t.corpId="+corp.getId());
				}
				if(null!=list && list.size()>0){
					TbZczbXwHzd hzd = (TbZczbXwHzd)list.get(0);
					this.setHzdId(hzd.getId().toString());
				}
			}
			if(null!=this.bgdId && this.bgdId.length()>0){
				TbZczbXwBgd bgd = (TbZczbXwBgd)this.utilService.getObjectById(TbZczbXwBgd.class, Long.parseLong(this.bgdId));
				this.setXwBgd(bgd);
			}
			List list = (List)this.utilService.getHqlQuery("from TbZczbXwBzh t where 1=1 and t.isDele=0 order by t.typeId,t.id");
			this.setObjList(this.initBzh(list, this.bgdId));
			this.setResult("xw_bgd_edit");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction toZc() 异常："+e.getMessage());
		}
		return ERROR;
	}
	
	/**
	 * 报告单保存
	 * @return
	 */
	public String saveBgd(){
		TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
		TbZczbXwHzd hzd1 = null;
		try {
			if(null!=this.hzdId && this.hzdId.length()>0){
				hzd1 = (TbZczbXwHzd)this.utilService.getObjectById(TbZczbXwHzd.class, Long.parseLong(this.hzdId));
			}
			if(null!=this.bgdId && this.bgdId.length()>0){
				TbZczbXwBgd bgd = (TbZczbXwBgd)this.utilService.getObjectById(TbZczbXwBgd.class, Long.parseLong(this.bgdId));
				if(null!=bgd){
					bgd = this.initBgd(bgd);
					this.utilService.update(bgd);
					this.initHzd();
					this.initYh(bgd);
					this.setTip("保存成功！");
					return this.bgdList();
				}
			}else{
				TbZczbXwBgd bgd = new TbZczbXwBgd();
				bgd = this.initBgd(bgd);
				if(null!=this.hzdId && this.hzdId.length()>0){
					bgd.setBgdYear(hzd1.getHzdYear());
					bgd.setBgdMonth(hzd1.getHzdMonth());
					bgd.setBgdNum(Integer.parseInt(this.utilService.getObjectBySql("select max(t.bgd_num) from tb_zczb_xw_bgd t where 1=1 " +
							"and t.bgd_year="+hzd1.getHzdYear()+" and t.bgd_month="+hzd1.getHzdMonth()+" and t.corp_id="+corp.getId()))+1);
				}else{
					bgd.setBgdYear(Integer.parseInt(UtilMethod.getZcYear()));
					bgd.setBgdMonth(Integer.parseInt(UtilMethod.getZcMonth()));
					bgd.setBgdNum(Integer.parseInt(this.utilService.getObjectBySql("select max(t.bgd_num) from tb_zczb_xw_bgd t where 1=1 " +
							"and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.corp_id="+corp.getId()))+1);
				}
				if(isHalfMonthReport(corp.getReportType())) {
					//bgd.setBgdQuarter(DateUtil.getCurrentSeason());
					bgd.setBgdHalf(DateUtil.currentReportPeriod());
				}
				bgd.setBgdPersonnel(this.bgdPersonnel);
				bgd.setBgdSaveTime(new Date());
				bgd.setCorpId(corp.getId());
				bgd.setIsDele("0");
				this.utilService.saveOrUpdate(bgd);
				this.initYh(bgd);
				//更新汇总单
				TbZczbXwHzd hzd = this.initHzd();
				bgd.setHzdId(hzd.getId());
				this.utilService.update(bgd);
				this.setTip("保存成功！");
				return this.bgdList();
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction saveBgd()异常："+e.getMessage());
		}
		return ERROR;
	}
	
	/**
	 * 报告单信息保存
	 * @param bgd
	 * @param bgdId
	 * @return
	 */
	public TbZczbXwBgd initBgd(TbZczbXwBgd bgd){
		TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
		int temp = 0;
		try {
			if(null!=this.bgdId && this.bgdId.length()>0){
				this.utilService.deleteBySql("delete tb_zczb_xw_yh t where 1=1 and t.bgd_id="+this.bgdId);
			}
			if(null!=this.yhYes && this.yhYes.length>0){
				temp+=yhYes.length;
			}
			if(null!=this.yhNo && this.yhNo.length>0){//不合格,隐患
				bgd.setBgdYhNum(this.yhNo.length);
				temp+=yhNo.length;
			}else{
				bgd.setBgdYhNum(0);
			}
			bgd.setBgdItemNum(temp);
			
			if(null!=this.zgYes && this.zgYes.length>0){//已整改的
				bgd.setBgdClNum(this.zgYes.length);
			}else{
				bgd.setBgdClNum(0);
			}
			if(null!=this.zgNo && this.zgNo.length>0){//已整改的
				bgd.setBgdWclNum(this.zgNo.length);
			}else{
				bgd.setBgdWclNum(0);
			}
			
			bgd.setBgdItemNum(temp);
			bgd.setBgdPersonnel(this.bgdPersonnel);
			
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction initBgd() 异常："+e.getMessage());
		}
		return bgd;
	}
	
	/**
	 * 报告单信息保存
	 * @param bgd
	 * @param bgdId
	 * @return
	 */
	public void initYh(TbZczbXwBgd bgd){
		TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
		try {
			if(null!=this.yhYes && this.yhYes.length>0){
				for(int i=0;i<this.yhYes.length;i++){
					String[] tmp = this.yhYes[i].split(",");
					TbZczbXwBzh item = (TbZczbXwBzh)this.utilService.getObjectById(TbZczbXwBzh.class, Long.parseLong(tmp[0]));
					TbZczbXwYh yh = new TbZczbXwYh();
					yh.setBgdId(bgd.getId());
					yh.setCorpId(corp.getId());
					yh.setIsDele("0");
					yh.setIsYh("1");
					yh.setIsZg("");
					yh.setYhType1(item.getTypeId());
					yh.setYhType1Name(item.getTypeName());
					yh.setYhType2(item.getId());
					yh.setYhType2Name(item.getBzhInfo());
					yh.setYhYj(item.getBzhYj());
					this.utilService.save(yh);
				}
			}
			if(null!=this.yhNo && this.yhNo.length>0){//不合格,隐患
				for(int i=0;i<this.yhNo.length;i++){
					String isZg = "1";
					String[] tmp = this.yhNo[i].split(",");
					TbZczbXwBzh item = (TbZczbXwBzh)this.utilService.getObjectById(TbZczbXwBzh.class, Long.parseLong(tmp[0]));
					TbZczbXwYh yh = new TbZczbXwYh();
					yh.setBgdId(bgd.getId());
					yh.setCorpId(corp.getId());
					yh.setIsDele("0");
					yh.setIsYh("0");
					if(null!=this.zgYes && this.zgYes.length>0){//已整改的
						for(int x=0;x<this.zgYes.length;x++){
							String[] tmp1 = this.yhNo[i].split(",");
							if(tmp[0]==tmp1[0]){
								isZg = "1";
								break;
							}
						}
					}
					if(null!=this.zgNo && this.zgNo.length>0){//已整改的
						for(int x=0;x<this.zgNo.length;x++){
							String[] tmp1 = this.yhNo[i].split(",");
							if(tmp[0]==tmp1[0]){
								isZg = "0";
								break;
							}
						}
					}
					yh.setIsZg(isZg);
					yh.setYhType1(item.getTypeId());
					yh.setYhType1Name(item.getTypeName());
					yh.setYhType2(item.getId());
					yh.setYhType2Name(item.getBzhInfo());
					yh.setYhYj(item.getBzhYj());
					this.utilService.save(yh);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction void initYh(TbZczbXwBgd bgd)异常："+e.getMessage());
		}
	}
	
	/**
	 * 删除报告单
	 *
	 */
	public void deleBgd(){
		this.contextPvd.getResponse().setContentType("charset=UTF-8");
		try {
			if(null!=this.getBgdId() && !"".equals(this.getBgdId())){
				TbZczbXwBgd bgd = (TbZczbXwBgd)this.utilService.getObjectById(TbZczbXwBgd.class, Long.parseLong(this.bgdId));
				if(null!=bgd){
					this.setHzdId(bgd.getHzdId().toString());
					this.utilService.deleteBySql("delete tb_zczb_xw_yh t where t.bgd_id="+bgd.getId());
					this.utilService.delete(bgd);
					this.initHzd();
					this.contextPvd.getResponse().getWriter().write("1");
				}else{
					this.contextPvd.getResponse().getWriter().write("2");
				}
			}else{
				this.contextPvd.getResponse().getWriter().write("2");
			}
			this.contextPvd.getResponse().getWriter().flush();
			this.contextPvd.getResponse().getWriter().close();
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("zczbAction deleFj() 异常："+e.getMessage());
		}
	}
	
	/**
	 * 报告单信息保存
	 * @param bgd
	 * @param bgdId
	 * @return
	 */
	public TbZczbXwHzd initHzd(){
		TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
		TbZczbXwHzd hzd = null;
		StringBuilder sql = new StringBuilder("select count(*) from tb_zczb_xw_bgd t where 1=1 ");//自查次数
		StringBuilder sql0 = new StringBuilder("select sum(t.bgd_item_num) from tb_zczb_xw_bgd t where 1=1 ");//自查项数
		StringBuilder sql1 = new StringBuilder("select sum(t.bgd_yh_num) from tb_zczb_xw_bgd t where 1=1 ");//不合格数
		StringBuilder sql2 = new StringBuilder("select sum(t.bgd_cl_num) from tb_zczb_xw_bgd t where 1=1 ");//处理数
		StringBuilder sql3 = new StringBuilder("select sum(t.bgd_wcl_num) from tb_zczb_xw_bgd t where 1=1 ");//未处理数
		try {
			if(null!=this.hzdId && this.hzdId.length()>0){
				hzd = (TbZczbXwHzd)this.utilService.getObjectById(TbZczbXwHzd.class, Long.parseLong(this.hzdId));
				
				if(isHalfMonthReport(corp.getReportType())) {
					sql.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth()+" and t.bgd_half=" + hzd.getHzdHalf());//自查次数
					sql0.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth()+" and t.bgd_half=" + hzd.getHzdHalf());//自查项数
					sql1.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth()+" and t.bgd_half=" + hzd.getHzdHalf());//一般隐患数
					sql2.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth()+" and t.bgd_half=" + hzd.getHzdHalf());//重大隐患数
					sql3.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth()+" and t.bgd_half=" + hzd.getHzdHalf());//一般隐患处理数
				} else {
					sql.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth());//自查次数
					sql0.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth());//自查项数
					sql1.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth());//一般隐患数
					sql2.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth());//重大隐患数
					sql3.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+hzd.getHzdYear()+" and t.bgd_month="+hzd.getHzdMonth());//一般隐患处理数
				}
				
			}else{
				hzd = new TbZczbXwHzd();
				if(isHalfMonthReport(corp.getReportType())) {
					sql.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.bgd_half=" + DateUtil.currentReportPeriod());//自查次数
					sql0.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.bgd_half=" +  DateUtil.currentReportPeriod());//自查项数
					sql1.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.bgd_half=" +  DateUtil.currentReportPeriod());//一般隐患数
					sql2.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.bgd_half=" +  DateUtil.currentReportPeriod());//重大隐患数
					sql3.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth()+" and t.bgd_half=" +  DateUtil.currentReportPeriod());//一般隐患处理数
					hzd.setHzdHalf(DateUtil.currentReportPeriod());
				} else {
					sql.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth());//自查次数
					sql0.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth());//自查项数
					sql1.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth());//一般隐患数
					sql2.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth());//重大隐患数
					sql3.append(" and t.corp_id="+corp.getId()+" and t.bgd_year="+UtilMethod.getZcYear()+" and t.bgd_month="+UtilMethod.getZcMonth());//一般隐患处理数
				}
				
				hzd.setHzdYear(Integer.parseInt(UtilMethod.getZcYear()));
				hzd.setHzdMonth(Integer.parseInt(UtilMethod.getZcMonth()));
				hzd.setHzdSaveTime(new Date());
				if(isTestEnv) {
					hzd.setHzdStatus("1");
				} else {
					hzd.setHzdStatus("0");
				}
				hzd.setIsDele("0");
				hzd.setHzdLooks(0);
				hzd.setHzdChecks(0);
				hzd.setCorpId(corp.getId());
				this.utilService.save(hzd);
			}
			if(null!=hzd){
				if(Integer.parseInt(this.utilService.getObjectBySql(sql.toString()))==0 && "0".equals(hzd.getHzdStatus())){//如果报告单为0，并且汇总单状态为为提交状态
					this.utilService.delete(hzd);
				}else{
					hzd.setHzdBgdNum(Integer.parseInt(this.utilService.getObjectBySql(sql.toString())));
					hzd.setHzdItemNum(Integer.parseInt(this.utilService.getObjectBySql(sql0.toString())));
					hzd.setHzdYhNum(Integer.parseInt(this.utilService.getObjectBySql(sql1.toString())));
					hzd.setHzdClNum(Integer.parseInt(this.utilService.getObjectBySql(sql2.toString())));
					hzd.setHzdWclNum(Integer.parseInt(this.utilService.getObjectBySql(sql3.toString())));
					this.utilService.update(hzd);
				}
			}
			
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("zczbAction initHzd() 异常："+e.getMessage());
		}
		return hzd;
	}
	
	public List initBzh(List<TbZczbXwBzh> infoList,String bgdId){
		try {
			TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
			List<TbZczbXwYh> yhList = this.zczbService.getXwYhList(corp.getId().toString(),bgdId);
			if(null!=infoList && infoList.size()>0 && null!=yhList && yhList.size()>0){
				for(TbZczbXwBzh bzh : infoList){
					for(TbZczbXwYh yh : yhList){
						if(yh.getYhType2().toString().equals(bzh.getId().toString())){
							bzh.setYhId(yh.getId().toString());
							bzh.setIsCheck(yh.getIsYh());
							bzh.setIsZg(yh.getIsZg());
						}
					}
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction List initBzh(List<TbZczbXwBzh> infoList,String bgdId)异常："+e.getMessage());
		}
		return infoList;
	}
	
	/**
	 * 报告单列表，列出本年度所有上报列表
	 * @return
	 */
	public String hisList(){
		try {
			TbCorpInfo corp = (TbCorpInfo)this.contextPvd.getSessionAttr(Util.SESSION_CORPUSER);
			Calendar cal = Calendar.getInstance();
			int year = cal.get(Calendar.YEAR);
			StringBuilder hql = new StringBuilder("from TbZczbXwHzd t where 1=1 and t.hzdStatus=1 and t.corpId="+corp.getId());
//			StringBuilder hql = new StringBuilder("from TbZczbXwHzd t where 1=1 and t.corpId="+corp.getId());
			if(null!=this.cYear && this.cYear.length()>0){
				hql.append(" and t.hzdYear="+this.cYear);
			}else{
				hql.append(" and t.hzdYear="+year);
				this.setCYear(String.valueOf(year));
			}
			hql.append("order by t.hzdMonth");
			this.setObjList((List)this.utilService.getHqlQuery(hql.toString()));
			this.setYearList(UtilMethod.getYearList(2012));
			this.setResult("xw_his_list");
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction hisList() 异常："+e.getMessage());
		}
		return ERROR;
	}
	
	/**
	 * 报告单列表
	 * @return
	 */
	public String hisBgdList(){
		try {
			if(null!=this.hzdId && this.hzdId.length()>0){
				this.setObjList((List)this.utilService.getHqlQuery("from TbZczbXwBgd t where 1=1 and t.hzdId="+this.hzdId+" order by t.bgdNum"));
				this.setResult("xw_his_bgd_list");
				return SUCCESS;
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction hisBgdList() 异常："+e.getMessage());
		}
		this.setTip("数据不存在！");
		return ERROR;
	}
	
	/**
	 * 隐患列表
	 * @return
	 */
	public String hisYhList(){
		try {
			if(null!=this.bgdId && this.bgdId.length()>0){
				this.setObjList((List)this.utilService.getHqlQuery("from TbZczbXwYh t where 1=1 and t.bgdId="+this.bgdId+" order by t.yhType1,t.yhType2"));
				this.setResult("xw_his_yh_list");
				return SUCCESS;
			}
		} catch (Exception e) {
			e.printStackTrace();
			Loggers.error("XwAction hisYhList() 异常："+e.getMessage());
		}
		this.setTip("数据不存在！");
		return ERROR;
	}

	public TbZczbXwBgd getXwBgd() {
		return xwBgd;
	}

	public void setXwBgd(TbZczbXwBgd xwBgd) {
		this.xwBgd = xwBgd;
	}

	public String getBgdPersonnel() {
		return bgdPersonnel;
	}

	public void setBgdPersonnel(String bgdPersonnel) {
		this.bgdPersonnel = bgdPersonnel;
	}

	public String[] getYhNo() {
		return yhNo;
	}

	public void setYhNo(String[] yhNo) {
		this.yhNo = yhNo;
	}

	public String[] getYhYes() {
		return yhYes;
	}

	public void setYhYes(String[] yhYes) {
		this.yhYes = yhYes;
	}

	public String[] getZgNo() {
		return zgNo;
	}

	public void setZgNo(String[] zgNo) {
		this.zgNo = zgNo;
	}

	public String[] getZgYes() {
		return zgYes;
	}

	public void setZgYes(String[] zgYes) {
		this.zgYes = zgYes;
	}

}
